<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
<html>
  <head>
    <title>${appname}</title>
	<%@include file="../meta.jsp"%>
	<script src="${ctx}/js/common/jquery-1.6.2.min.js" type="text/javascript"></script>
	<script language="javascript" type="text/javascript" src="${ctx}/js/lhgdialog/lhgdialog.min.js"></script>
	<script src="${ctx}/js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
  </head>
  
  <body>
    <div class="Teg_body">
    	<%@include file="../header.jsp"%>
    	
    	<div class="Teg_content">
    		<div class="content_left i-pane" id="zhd_LeftPane" paneid="LeftPane">
    			<div class="m-second-menu-title">
	    			<span class="Head">出差申请</span>
    			</div>
    			<div class="m-second-menu-ct ZHDAlignleft">
	    			<div class="accordion-3-container">
	    				<ul class="accordion-3">
	    					<li><div class="level-first"><a href="${ctx}/pubCcsq/create.do">出差申请</a></div></li>
	    					<li class="active"><div class="level-first"><a href="${ctx}/pubCcsq/myList.do">我的出差申请</a></div></li>
	    				</ul>
	    			</div>
    			</div>
    			
    			<%@include file="../leftmenu.jsp"%>
    		</div>
    		<div class="content_right">
    			<div class="second_breadcrumb">
    				<span class="current_position">您的当前位置：<a href="${ctx}">首页</a>></span><span><a href="${ctx}/pubCcsq/myList.do" class="SkinObject">出差申请</a></span>
    			</div>
    			<div class="content_ct i-pane" id="zhd_ContentPane" style="margin-top: 5px;">
    				<s:form action="pubCcsq/myList.do" method="post">
    				<div class="search_cond">
    					&nbsp;&nbsp;
    					出差类型：<mytag:select id="cclx" title="请输入类别" name="cclx" sql="basedata" isSql="false" condition="102" dataType="Long" listKey="id" listValue="name" headerKey="" headerValue="请选择"/>
    					时间：<s:textfield key="tjsjBegin" title="请选择时间" cssClass="form-txtinput" id="tjsjBegin" size="10" maxlength="10" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})" readonly="true" value="%{model.uptimeBegin}"/>
    					<input type="submit" value="查询"/>
    				</div>
    				<table width="100%" align="center" class="list-table" borderColor="#e3ecf6" bgColor="#e3ecf6" border="0" cellSpacing="1" cellPadding="0">
	    				<tr style="background: #f6fbff;height: 30px;">
	    					<td width="5%" align="center">序号</td>
	    					<td width="10%" align="center">员工编号</td>
	    					<td width="10%" align="center">员工姓名</td>
	    					<td width="10%" align="center">出差类型</td>
	    					<td width="10%" align="center">层级</td>
	    					<td width="15%" align="center">时间</td>
	    					<td width="10%" align="center">状态</td>
	    					<td width="10%" align="center">操作</td>
	    				</tr>
	    				<c:forEach items="${page.result}" var="item" varStatus="status">
						<tr height="30"${status.index%2 == 0?'class="gray"':''}>
							<td align="center">${page.thisPageFirstElementNumber + status.index}</td>
							<td align="left">${item.ygbh}</td>
							<td align="left">${item.ygxm}</td>
							<td align="left">${item.cclx}</td>
							<td align="left">${item.zyfzcj}</td>
							<td align="left">${item.tjsjString}</td>
							<td align="left">
								<c:if test="${item.zt == 0}">待审核</c:if>
								<c:if test="${item.zt == 1}">完成</c:if>
								<c:if test="${item.zt == 2}">审核通过</c:if>
								<c:if test="${item.zt == 3}">退回</c:if>
							</td>
							<td align="center">
								<c:if test="${item.zt == 2}">
								<a href="javascript:;" onclick="editDetail('${item.id}')">处理</a>
								</c:if>
								<c:if test="${item.zt != 2}">
								<a href="javascript:;" onclick="ccsqDetail('${item.id}')">查看</a>
								</c:if>
							</td>
						</tr>
						</c:forEach>
						
						<c:if test="${fn:length(page.result)==0}">
						<tr>
					    	<td colspan="8"><div class="note_red_in_div">系统没有查找到符合条件的数据！</div></td>
					    </tr>
					    </c:if>
    				</table>
    				<input type="hidden" name="pageNumber" value="${page.thisPageNumber}"/>
					<input type="hidden" name="pageSize" value="${page.pageSize}"/>
					<simpletable:homePageToolbar page="${page}"/>
    				</s:form>
    			</div>
    		</div>
    		<div class="clear"></div>
    	</div>
    	<%@include file="../bottom.jsp"%>
    </div>
  </body>
</html>
<script type="text/javascript">
function ccsqDetail(id){
  $.dialog({id:'abc', title:'出差申请详情', content: 'url:${ctx}/pubCcsq/detail.do?id='+id+'&timestamp='+new Date().getTime(), max:false,min:false,width:550, height:400});
}
function editDetail(id){
  $.dialog({id:'abc', title:'提交出差申请报告', content: 'url:${ctx}/pubCcsq/edit.do?id='+id+'&timestamp='+new Date().getTime(), max:false,min:false,width:550, height:400});
}
</script>